package exer01;

/**
 * @author shkstart
 * @date 2022/5/12 - 22:00
 */
public class MyRectangle extends GeometricObject {
    private double width;
    private double height;


    public MyRectangle(double width,double height,String color,double weight) {
        this.width = width;
        this.height = height;
        this.color = color;
        this.weight = weight;
    }

    public double getWidth() {
        return width;
    }

    public void setWidth(double width) {
        this.width = width;
    }

    public double getHeight() {
        return height;
    }

    public void setHeight(double height) {
        this.height = height;
    }

    public double findArea() {
        return getHeight() * getWidth();
    }
}
